package com.blb.zycommunity.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 单元
 * </p>
 *
 * @author chenheng
 * @since 2023-11-20
 */
@Data
@TableName("zy_unit")
@ApiModel(value = "ZyUnit对象", description = "单元 ")
public class ZyUnit implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableId
    @ApiModelProperty("单元id")
    private Long unitId;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty("小区id")
    private Long communityId;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty("楼栋id")
    private Long buildingId;

    @TableField(exist = false)
    private String buildingName;

    @ApiModelProperty("单元名称")
    private String unitName;

    @ApiModelProperty("单元编号")
    private String unitCode;

    @ApiModelProperty("层数")
    private Integer unitLevel;

    @ApiModelProperty("建筑面积")
    private BigDecimal unitAcreage;

    @ApiModelProperty("是否有电梯")
    private String unitHaveElevator;

    @ApiModelProperty("创建者")
    private String createBy;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新者")
    private String updateBy;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("备注")
    private String remark;

    @TableField(exist = false)
    private List<ZyUnit> children;

    @TableField(exist = false)
    private ZyBuilding zybuilding;

    @TableField(exist = false)
    private ZyCommunity zyCommunity;

    @TableField(exist = false)
    private ZyRoom zyRoom;

}
